package com.ny.zuoye;

public class BankPay implements Pay{
    double m=150;

    @Override
    public void pay(double money) {
        if(m>=money){
            System.out.println("你消费的金额为"+money);
//        消费完的余额
            m = m - money;
            System.out.println("余额"+m);
        }
        else {
            System.out.println("你的余额不足");
        }

    }
}
